#!/bin/sh
cd /usr/local/kafka_2.12-1.0.0/bin
#启动zookeeper
nohup ./zookeeper-server-start.sh ../config/zookeeper.properties  &
sleep 10
#启动kafka
nohup ./kafka-server-start.sh ../config/server.properties &
sleep 15
#判断是否启动成功
count=`netstat -anp | grep 9092 | wc -l`
if [ $count -gt 1 ]
then
	echo "kafka is running !"
fi
